package com.装饰者模式;

import com.装饰者模式.装饰者.DouJIang;
import com.装饰者模式.装饰者.NaoLao;

public class ClientController {

    public static void main(String[] args) {
        Drink drink=new MeiShiCoffee();
        System.out.println("=======================================================");
        System.out.println("点一份"+drink.getDesc()+"："+drink.cost());
        drink=new DouJIang(drink);
        System.out.println("======================================================");
        System.out.println("加入豆浆"+drink.getDesc()+"："+drink.cost());
        drink=new NaoLao(drink);
        System.out.println("=======================================================");
        System.out.println("再加入奶酪"+drink.getDesc()+"："+drink.cost());
        drink=new NaoLao(drink);
        System.out.println("==========================================================");
        System.out.println("最后一步再加入奶酪"+drink.getDesc()+"："+drink.cost());
    }
}
